package com.patterns.java.strategy.demo2;

/**
 * @author 三多
 * @Time 2021/10/13
 */
public class Context {
    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    /**
     * 选择策略操作
     * @param num1
     * @param num2
     * @return
     */
    public int executeOperation(int num1 ,int num2){
        return strategy.doOperate(num1,num2);
    }
}
